package com.ibuonline.search.solr.extend;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.dimeng.commons.utils.spring.SpringContextHolder;
import com.ibuonline.search.solr.extend.service.CompanyManager;

public class ExternalDataContext {
	private static final ExternalDataContext instance = new ExternalDataContext();
	public Map<String, Boolean> onlineStatus = new HashMap<String, Boolean>();
	public CompanyManager companyManager;

	private ExternalDataContext() {
		companyManager = SpringContextHolder.getApplicationContext().getBean(
				CompanyManager.class);
	}

	public static ExternalDataContext getInstance() {
		return instance;
	}

	/**
	 * @return the onlineStatus
	 */
	public List<Long> getOnlineUserIds() {
		return companyManager.findOnlineCompanyUserIds();
	}
}
